#!/bin/bash

set -e

####
## Functions
####

function initial_conf() {
    # This function runs the initial configuration the module needs once it is installed
    mkdir -p /var/lib/zentyal/conf/samba/sync_shares
    chown -R ebox:ebox /var/lib/zentyal/conf/samba
}


function mod_disabled() {
    # This function stops and disables the services that uses the module
    systemctl disable --now smbd nmbd winbind samba-ad-dc zentyal.samba-sync
}


####
## Calls
####

initial_conf
mod_disabled

exit 0
